using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace web
{
    public partial class GBBig_Form : Form
    {
        const int GB=0;
        const int BIG5 = 1;
        public GBBig_Form()
        {
            InitializeComponent();
            this.comboBox1_first.SelectedIndex = GB;
            this.comboBox_second.SelectedIndex = BIG5;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            GBBIG gbBig5 = new GBBIG();
            if (this.comboBox1_first.SelectedIndex == GB)
            {
                this.textBox_.Text = gbBig5.obtainBig(this.textBox_.Text);
            }
            else
            {
                this.textBox_.Text = gbBig5.obtainGb(this.textBox_.Text);
            }
        }

        private void comboBox1_first_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.comboBox1_first.SelectedIndex == GB)
            {
                this.comboBox_second.SelectedIndex = BIG5;
            }
            else
            {
                this.comboBox_second.SelectedIndex = GB;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.textBox_.Text = "";
        }
    }
}